package com.wanbangee.marksystem.service.imp;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wanbangee.marksystem.dao.StatisticsObjectiveScoreDao;
import com.wanbangee.marksystem.dao.StatisticsScoreReportDao;
import com.wanbangee.marksystem.dao.StatisticsSubjectiveScoreDao;
import com.wanbangee.marksystem.entities.StatisticsObjectiveScore;
import com.wanbangee.marksystem.entities.StatisticsSubjectiveScore;
import com.wanbangee.marksystem.service.QueryObjectiveAndSubjectiveSituationService;

@Service
public class QueryObjectiveAndSubjectiveSituationServiceImp implements QueryObjectiveAndSubjectiveSituationService {

	@Autowired
	private StatisticsScoreReportDao statisticsScoreReportDao;
	
	@Autowired
	private StatisticsObjectiveScoreDao statisticsObjectiveScoreDao;
	
	@Autowired
	private StatisticsSubjectiveScoreDao statisticsSubjectiveScoreDao;
	
	@Override
	public Map<String, Object> selectObjectiveAndSubjectiveSituation(Integer examId, Integer subId, Integer claId) {
		Map<String, Object> map = new HashMap<>();
		//客观题、主观题概况
		map.put("objectSituation", this.statisticsScoreReportDao.selecteObjectiveSituation(examId, claId, subId));
		map.put("subjectSituation", this.statisticsScoreReportDao.selecteSubjectiveSituation(examId, claId, subId));
		return map;
	}

	@Override
	public List<StatisticsObjectiveScore> selectObjectiveScoreSituation(Integer examId, Integer subId, Integer claId) {
		return this.statisticsObjectiveScoreDao.selectObjectiveScoreSituation(examId, claId, subId);
	}

	@Override
	public List<StatisticsSubjectiveScore> selectSubjectiveScoreSituation(Integer examId, Integer subId,Integer claId) {
		return this.statisticsSubjectiveScoreDao.selectSubjectiveScoreSituation(examId, claId, subId);
	}

}
